#include "iostream"

#include "parser.h"

class TestTagHandler: public cm_xmpp::TagHandler
{
public:
    virtual void handleTag( cm_xmpp::Tag* tag )
    {
        if( tag )
        {
            std::cout<<tag->xml()<<std::endl;
        }
    }
protected:
private:
};

int main()
{
    TestTagHandler th;
    cm_xmpp::Parser p(&th, false);

    std::string xml = "<shibo><test></test></shibo>";

    p.feed( xml );

    xml = "<stream:stream version='1.0' to='example.org' xmlns='jabber:client' id='abcdef' "
        "xmlns:stream='http://etherx.jabber.org/streams'>";
    p.feed( xml );

    return 0;
}